package com.lejin.usercenter.controller;


import com.lejin.interceptor.UserInfoInterceptor;
import com.lejin.usercenter.service.IOrderPayService;

import com.lejin.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 订单支付信息表 前端控制器
 * </p>
 *
 * @author luminghua
 * @since 2022-04-22
 */
@RestController
@CrossOrigin
@RequestMapping("/usercenter/order-pay")
public class OrderPayController {


    @Autowired
    private UserInfoInterceptor userInfoInterceptor;
    @Autowired
    private IOrderPayService iOrderPayService;



    //根据用户id查询已支付的订单

    @GetMapping("list")
    public ResultVO list(){
        String s = userInfoInterceptor.getThreadLocal().get();
        ResultVO orderPayByUid = iOrderPayService.findOrderPayByUid(s);
        return orderPayByUid;

    }
}
